<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.css" integrity="sha256-6cQIC71/iBIYXFK+0RHAvwmjwWzkWd+r7v/BX3/vZDc=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/themes/green/pace-theme-minimal.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"sumumm.github.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.19.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"fold":{"enable":true,"height":300},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="GitHub Actions是什么？能干什么？有什么东西？若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:type" content="article">
<meta property="og:title" content="LV02-GitHubActions-01-了解GitHubActions">
<meta property="og:url" content="https://sumumm.github.io/post/cae87acd.html">
<meta property="og:site_name" content="苏木">
<meta property="og:description" content="GitHub Actions是什么？能干什么？有什么东西？若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/05GithubActions/LV02-GitHubActions-01-%E4%BA%86%E8%A7%A3GitHubActions/img/overview-actions-simple.webp">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/05GithubActions/LV02-GitHubActions-01-%E4%BA%86%E8%A7%A3GitHubActions/img/image-20241227150710295.png">
<meta property="article:published_time" content="2024-12-28T01:54:58.000Z">
<meta property="article:modified_time" content="2025-06-13T16:25:57.072Z">
<meta property="article:author" content="苏木">
<meta property="article:tag" content="GithubActions">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/05GithubActions/LV02-GitHubActions-01-%E4%BA%86%E8%A7%A3GitHubActions/img/overview-actions-simple.webp">


<link rel="canonical" href="https://sumumm.github.io/post/cae87acd.html">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":"","permalink":"https://sumumm.github.io/post/cae87acd.html","path":"post/cae87acd.html","title":"LV02-GitHubActions-01-了解GitHubActions"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>LV02-GitHubActions-01-了解GitHubActions | 苏木</title>
  








    <script src="/js/browser_tools_disable.js"></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<!-- hexo injector head_end start --><link rel="stylesheet" href="https://unpkg.com/hexo-next-tags-plus@latest/lib/tag_plus.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">苏木</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">我的学习之路</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>苏木的家</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类页<span class="badge">42</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档页<span class="badge">673</span></a></li><li class="menu-item menu-item-flink"><a href="/flink/" rel="section"><i class="fa fa-link fa-fw"></i>友人帐</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于我</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E4%BA%86%E8%A7%A3-GitHub-Actions"><span class="nav-text">一、了解 GitHub Actions</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E6%A6%82%E8%BF%B0"><span class="nav-text">1. 概述</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-GitHub-Actions-%E7%9A%84%E7%BB%84%E6%88%90%E9%83%A8%E5%88%86"><span class="nav-text">2. GitHub Actions 的组成部分</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-workflows%E2%80%94%E2%80%94%E5%B7%A5%E4%BD%9C%E6%B5%81"><span class="nav-text">2.1 workflows——工作流</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-events%E2%80%94%E2%80%94%E4%BA%8B%E4%BB%B6"><span class="nav-text">2.2 events——事件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3-jobs%E2%80%94%E2%80%94%E4%BD%9C%E4%B8%9A"><span class="nav-text">2.3 jobs——作业</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-4-actions%E2%80%94%E2%80%94%E6%93%8D%E4%BD%9C"><span class="nav-text">2.4 actions——操作</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-5-runners%E2%80%94%E2%80%94%E8%BF%90%E8%A1%8C%E5%99%A8"><span class="nav-text">2.5 runners——运行器</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90"><span class="nav-text">二、持续集成</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E5%85%B3%E4%BA%8E%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90"><span class="nav-text">1. 关于持续集成</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8-GitHub-Actions-%E8%BF%9B%E8%A1%8C%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90"><span class="nav-text">2. 关于使用 GitHub Actions 进行持续集成</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E5%B7%A5%E4%BD%9C%E6%B5%81%E6%A8%A1%E6%9D%BF"><span class="nav-text">3. 工作流模板</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E6%8C%81%E7%BB%AD%E9%83%A8%E7%BD%B2"><span class="nav-text">三、持续部署</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E5%85%B3%E4%BA%8E%E6%8C%81%E7%BB%AD%E9%83%A8%E7%BD%B2"><span class="nav-text">1. 关于持续部署</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8-GitHub-Actions-%E8%BF%9B%E8%A1%8C%E6%8C%81%E7%BB%AD%E9%83%A8%E7%BD%B2"><span class="nav-text">2. 关于使用 GitHub Actions 进行持续部署</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E4%BD%BF%E7%94%A8-OpenID-Connect-%E8%AE%BF%E9%97%AE%E4%BA%91%E8%B5%84%E6%BA%90"><span class="nav-text">3. 使用 OpenID Connect 访问云资源</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-%E5%B7%A5%E4%BD%9C%E6%B5%81%E6%A8%A1%E6%9D%BF%E5%92%8C%E7%AC%AC%E4%B8%89%E6%96%B9%E6%93%8D%E4%BD%9C"><span class="nav-text">4. 工作流模板和第三方操作</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E6%8D%A2%E5%8F%A5%E8%AF%9D%E8%AF%B4%EF%BC%9F"><span class="nav-text">四、换句话说？</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="苏木"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">苏木</p>
  <div class="site-description" itemprop="description">莫道桑榆晚，为霞尚满天</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">673</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">43</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/sumumm" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;sumumm" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://sumumm.github.io/post/cae87acd.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="苏木">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="苏木">
      <meta itemprop="description" content="莫道桑榆晚，为霞尚满天">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="LV02-GitHubActions-01-了解GitHubActions | 苏木">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          LV02-GitHubActions-01-了解GitHubActions
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2024-12-28 09:54:58" itemprop="dateCreated datePublished" datetime="2024-12-28T09:54:58+08:00">2024-12-28</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/" itemprop="url" rel="index"><span itemprop="name">开发工具</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/05GithubActions/" itemprop="url" rel="index"><span itemprop="name">05GithubActions</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>4k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>14 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p>GitHub Actions是什么？能干什么？有什么东西？若笔记中有错误或者不合适的地方，欢迎批评指正😃。</p>
<span id="more"></span>

<!-- Photo: https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/05GithubActions/LV02-GitHubActions-01-%E4%BA%86%E8%A7%A3GitHubActions/img/ -->

<details class="folding-tag" blue><summary> 点击查看使用工具及版本 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center" rowspan="5">PC端开发环境</td>        <td align="center" width=150px>Windows</td>        <td align="left">Windows11</td>    </tr>    <tr>        <td align="center">Ubuntu</td>        <td align="left">Ubuntu20.04.2的64位版本</td>      </tr>    <tr>        <td align="center">VMware® Workstation 17 Pro</td>        <td align="left">17.6.0 build-24238078</td>      </tr>    <tr>        <td align="center">终端软件</td>        <td align="left">MobaXterm(Professional Edition v23.0 Build 5042 (license))</td>    </tr>    <tr>        <td align="center">Win32DiskImager</td>        <td align="left">Win32DiskImager v1.0</td>      </tr>    <tr>        <td align="center" rowspan="3">Linux开发板环境</td>        <td align="center">Linux开发板</td>        <td align="left">正点原子 i.MX6ULL Linux 阿尔法开发板</td>      </tr>    <tr>        <td align="center">uboot</td>        <td align="left">NXP官方提供的uboot，使用的uboot版本为U-Boot 2019.04</td>      </tr>    <tr>        <td align="center">linux内核</td>        <td align="left">linux-4.19.71(NXP官方提供)</td>      </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看本文参考资料 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="2">官方网站</td>        <td align="left"><a href="https://githubdocs.cn/en/actions/writing-workflows/workflow-syntax-for-github-actions" target="_blank">GitHub Actions 工作流程语法</a></td>        <td align="left">GitHub Actions 工作流程语法 - GitHub 文档 - GitHub 文档</td>    </tr>    <tr>        <td align="left"><a href="https://yaml.org/" target="_blank">YAML官网</a></td>        <td align="left">在这里可以找到YAML的基本语法</td>    </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看相关文件下载 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center">---</td>        <td align="left"><a href="" target="_blank">---</a></td>        <td align="left">---</td>    </tr></table>
              </div>
            </details>

<p>其实直接看【5】<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/guides">GitHub Actions 指南 - GitHub 文档 - GitHub 文档</a>就可以了，这里只是为了方便自己查看。</p>
<h1 id="一、了解-GitHub-Actions"><a href="#一、了解-GitHub-Actions" class="headerlink" title="一、了解 GitHub Actions"></a><font size=3>一、<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions">了解 GitHub Actions</a></font></h1><h2 id="1-概述"><a href="#1-概述" class="headerlink" title="1. 概述"></a><font size=3>1. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions#overview">概述</a></font></h2><p>GitHub Actions 是一个持续集成和持续交付 (CI&#x2F;CD) 平台，允许我们自动化构建、测试和部署管道。我们可以创建工作流来构建和测试我们存储库的每个拉取请求，或者将合并的拉取请求部署到生产环境。</p>
<p>GitHub Actions 不仅限于 DevOps，还允许我们在存储库中发生其他事件时运行工作流。例如，我们可以运行一个工作流，以便每当有人在我们的存储库中创建新问题时自动添加相应的标签。</p>
<p>GitHub 提供 Linux、Windows 和 macOS 虚拟机来运行我们的工作流，或者我们可以在我们自己的数据中心或云基础设施中托管我们自己的自托管运行器。</p>
<h2 id="2-GitHub-Actions-的组成部分"><a href="#2-GitHub-Actions-的组成部分" class="headerlink" title="2. GitHub Actions 的组成部分"></a><font size=3>2. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions#the-components-of-github-actions">GitHub Actions 的组成部分</a></font></h2><p>我们可以配置 GitHub Actions <strong>工作流</strong>，以便在存储库中发生<strong>事件</strong>时触发，例如打开拉取请求或创建问题。我们的工作流包含一个或多个<strong>作业</strong>，这些作业可以按顺序或并行运行。每个作业都将在其自己的虚拟机<strong>运行器</strong>或容器内运行，并且具有一或多个<strong>步骤</strong>，这些步骤要么运行我们定义的脚本，要么运行<strong>操作</strong>，这是一种可重用的扩展，可以简化我们的工作流。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/05GithubActions/LV02-GitHubActions-01-%E4%BA%86%E8%A7%A3GitHubActions/img/overview-actions-simple.webp"  />

<h3 id="2-1-workflows——工作流"><a href="#2-1-workflows——工作流" class="headerlink" title="2.1 workflows——工作流"></a><font size=3>2.1 <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions#workflows">workflows——工作流</a></font></h3><p><strong>工作流</strong>是一个可配置的自动化流程，它将运行一个或多个作业。工作流由签入到我们存储库的 YAML 文件定义，并在存储库中由事件触发时运行，或者可以手动触发，或者按照定义的计划触发。</p>
<p>工作流在存储库的<code>.github/workflows</code>目录中定义。一个存储库可以有多个工作流，每个工作流都可以执行不同的任务集，例如</p>
<ul>
<li>构建和测试拉取请求。</li>
<li>每次创建发行版时都部署我们的应用程序。</li>
<li>每当打开新问题时都添加标签。</li>
</ul>
<p>我们可以在另一个工作流中引用工作流。有关更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-workflows/reusing-workflows">重用工作流</a>”。</p>
<p>有关更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-workflows">编写工作流</a>”。</p>
<h3 id="2-2-events——事件"><a href="#2-2-events——事件" class="headerlink" title="2.2 events——事件"></a><font size=3>2.2 <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions#events">events——事件</a></font></h3><p><strong>事件</strong>是存储库中触发<strong>工作流</strong>运行的特定活动。例如，当有人创建拉取请求、打开问题或将提交推送到存储库时，活动可能源自 GitHub。我们还可以触发工作流以按 <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-workflows/events-that-trigger-workflows#schedule">计划</a>运行，通过 <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/rest/repos/repos#create-a-repository-dispatch-event">向 REST API 发送请求</a> 或手动运行。</p>
<p>有关可用于触发工作流的事件的完整列表，请参阅<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-workflows/events-that-trigger-workflows">触发工作流的事件</a>。</p>
<h3 id="2-3-jobs——作业"><a href="#2-3-jobs——作业" class="headerlink" title="2.3 jobs——作业"></a><font size=3>2.3 <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions#jobs">jobs——作业</a></font></h3><p><strong>作业</strong>是在同一<strong>运行器</strong>上执行的工作流中的一组<strong>步骤</strong>。每个步骤要么是要执行的 shell 脚本，要么是要运行的<strong>操作</strong>。步骤按顺序执行，并且相互依赖。由于每个步骤都在同一运行器上执行，因此我们可以将数据从一个步骤共享到另一个步骤。例如，我们可以有一个步骤来构建我们的应用程序，然后是一个步骤来测试构建的应用程序。</p>
<p>我们可以使用其他作业配置作业的依赖项；默认情况下，作业没有依赖项并并行运行。当作业依赖于另一个作业时，它会在运行之前等待依赖作业完成。</p>
<p>例如，我们可以为不同的架构配置多个构建作业，而没有任何作业依赖项，以及一个依赖于这些构建的打包作业。构建作业并行运行，一旦它们成功完成，打包作业就会运行。</p>
<p>更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-jobs">选择工作流的功能</a>”。</p>
<h3 id="2-4-actions——操作"><a href="#2-4-actions——操作" class="headerlink" title="2.4 actions——操作"></a><font size=3>2.4 <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions#actions">actions——操作</a></font></h3><p><strong>操作</strong>是 GitHub Actions 平台的自定义应用程序，用于执行复杂但经常重复的任务。使用操作可以帮助减少在<strong>工作流</strong>文件中编写的重复代码量。操作可以从 GitHub 拉取我们的 Git 存储库，为我们的构建环境设置正确的工具链，或为我们的云提供商设置身份验证。</p>
<p>我们可以编写自己的操作，也可以在 GitHub Marketplace 中查找可在工作流中使用的操作。</p>
<p>有关操作的更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/creating-actions">共享自动化</a>”。</p>
<h3 id="2-5-runners——运行器"><a href="#2-5-runners——运行器" class="headerlink" title="2.5 runners——运行器"></a><font size=3>2.5 <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/understanding-github-actions#runners">runners——运行器</a></font></h3><p><strong>运行器</strong>是触发工作流时运行工作流的服务器。每个运行器一次只能运行一个<strong>作业</strong>。GitHub 提供 Ubuntu Linux、Microsoft Windows 和 macOS 运行器来运行我们的<strong>工作流</strong>。每次工作流运行都在一个新的、新配置的虚拟机中执行。</p>
<p>GitHub 还提供更大规模的运行器，这些运行器具有更大的配置。更多信息，请参阅<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-github-hosted-runners/using-larger-runners">使用更大规模的运行器</a>。</p>
<p>如果我们需要不同的操作系统或需要特定的硬件配置，我们可以自己托管运行器。</p>
<p>有关自托管运行器的更多信息，请参阅<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/hosting-your-own-runners">托管我们自己的运行器</a>。</p>
<h1 id="二、持续集成"><a href="#二、持续集成" class="headerlink" title="二、持续集成"></a><font size=3>二、<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-integration-with-github-actions">持续集成</a></font></h1><h2 id="1-关于持续集成"><a href="#1-关于持续集成" class="headerlink" title="1. 关于持续集成"></a><font size=3>1. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-integration-with-github-actions#about-continuous-integration">关于持续集成</a></font></h2><p>持续集成 (CI) 是一种软件实践，要求频繁地将代码提交到共享存储库。更频繁地提交代码可以更快地检测到错误，并减少开发人员在查找错误根源时需要调试的代码量。频繁的代码更新还可以更轻松地合并来自软件开发团队不同成员的更改。这对开发人员来说非常棒，他们可以花费更多时间编写代码，而花费更少的时间调试错误或解决合并冲突。</p>
<p>当我们将代码提交到存储库时，我们可以持续构建和测试代码，以确保提交不会引入错误。我们的测试可以包括代码 linter（检查样式格式）、安全检查、代码覆盖率、功能测试和其他自定义检查。</p>
<p>构建和测试代码需要服务器。我们可以在将代码推送到存储库之前在本地构建和测试更新，也可以使用 CI 服务器检查存储库中是否有新的代码提交。</p>
<h2 id="2-关于使用-GitHub-Actions-进行持续集成"><a href="#2-关于使用-GitHub-Actions-进行持续集成" class="headerlink" title="2. 关于使用 GitHub Actions 进行持续集成"></a><font size=3>2. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-integration-with-github-actions#about-continuous-integration-using-github-actions">关于使用 GitHub Actions 进行持续集成</a></font></h2><p>使用 GitHub Actions 进行 CI 可以提供工作流，这些工作流可以构建存储库中的代码并运行我们的测试。工作流可以在 GitHub 托管的虚拟机上运行，也可以在我们自己托管的机器上运行。有关更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-github-hosted-runners/about-github-hosted-runners">使用 GitHub 托管的运行器</a>”和“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners">关于自托管运行器</a>”。</p>
<p>我们可以配置 CI 工作流，使其在发生 GitHub 事件时运行（例如，当新代码推送到我们的存储库时）、按设定的时间表运行，或使用存储库调度 Webhook 在发生外部事件时运行。</p>
<p>GitHub 会运行我们的 CI 测试，并在拉取请求中提供每个测试的结果，以便我们可以查看分支中的更改是否引入了错误。当工作流中的所有 CI 测试都通过时，我们推送的更改就可以由团队成员审查或合并。如果测试失败，则我们的更改之一可能是导致失败的原因。</p>
<p>在存储库中设置 CI 时，GitHub 会分析存储库中的代码，并根据存储库中的语言和框架推荐 CI 工作流。例如，如果我们使用 <a target="_blank" rel="noopener" href="https://node.org.cn/en/">Node.js</a>，GitHub 将建议一个工作流模板，该模板会安装我们的 Node.js 包并运行我们的测试。我们可以使用 GitHub 建议的 CI 工作流模板、自定义建议的工作流模板，或创建自己的自定义工作流文件来运行 CI 测试。</p>
<p>除了帮助我们为项目设置 CI 工作流外，我们还可以使用 GitHub Actions 在整个软件开发生命周期中创建工作流。例如，我们可以使用 Actions 来部署、打包或发布我们的项目。有关更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/learn-github-actions">编写工作流</a>”。</p>
<p>有关常见术语的定义，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/learn-github-actions/understanding-github-actions">了解 GitHub Actions</a>”。</p>
<h2 id="3-工作流模板"><a href="#3-工作流模板" class="headerlink" title="3. 工作流模板"></a><font size=3>3. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-integration-with-github-actions#workflow-templates">工作流模板</a></font></h2><p>GitHub 提供了针对各种语言和框架的 CI 工作流模板。</p>
<p>在 <a target="_blank" rel="noopener" href="https://github.com/actions/starter-workflows/tree/main/ci">actions&#x2F;starter-workflows</a> 存储库中浏览 GitHub 提供的完整 CI 工作流模板列表。</p>
<h1 id="三、持续部署"><a href="#三、持续部署" class="headerlink" title="三、持续部署"></a><font size=3>三、<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-deployment-with-github-actions">持续部署</a></font></h1><p>我们可以使用 GitHub Actions 直接在我们的 GitHub 存储库中创建自定义持续部署 (CD) 工作流。</p>
<h2 id="1-关于持续部署"><a href="#1-关于持续部署" class="headerlink" title="1. 关于持续部署"></a><font size=3>1. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-deployment-with-github-actions#about-continuous-deployment">关于持续部署</a></font></h2><p><em>持续部署</em> (CD) 是一种利用自动化发布和部署软件更新的实践。作为典型 CD 流程的一部分，代码会在部署前自动构建和测试。</p>
<p>持续部署通常与持续集成相结合。有关持续集成的更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/automating-builds-and-tests/about-continuous-integration">关于使用 GitHub Actions 进行持续集成</a>”。</p>
<h2 id="2-关于使用-GitHub-Actions-进行持续部署"><a href="#2-关于使用-GitHub-Actions-进行持续部署" class="headerlink" title="2. 关于使用 GitHub Actions 进行持续部署"></a><font size=3>2. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-deployment-with-github-actions#about-continuous-deployment-using-github-actions">关于使用 GitHub Actions 进行持续部署</a></font></h2><p>我们可以设置一个 GitHub Actions 工作流来部署我们的软件产品。为了验证我们的产品按预期工作，我们的工作流可以在部署前构建存储库中的代码并运行我们的测试。</p>
<p>我们可以配置我们的 CD 工作流，使其在发生 GitHub 事件时运行（例如，当新代码推送到存储库的默认分支时）、按设定的时间表运行、手动运行或当使用存储库调度 Webhook 发生外部事件时运行。有关工作流何时可以运行的更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/using-workflows/events-that-trigger-workflows">触发工作流的事件</a>”。</p>
<p>GitHub Actions 提供了一些功能，让我们可以更好地控制部署。例如，我们可以使用环境来要求在作业继续执行之前获得批准，限制哪些分支可以触发工作流，或限制对密钥的访问。我们可以使用并发性将我们的持续交付管道限制为最多一个正在进行的部署和一个挂起的部署。有关这些功能的更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/deployment/about-deployments/deploying-with-github-actions">使用 GitHub Actions 部署</a>”和“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/deployment/targeting-different-environments/managing-environments-for-deployment">管理部署环境</a>”。</p>
<h2 id="3-使用-OpenID-Connect-访问云资源"><a href="#3-使用-OpenID-Connect-访问云资源" class="headerlink" title="3. 使用 OpenID Connect 访问云资源"></a><font size=3>3. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-deployment-with-github-actions#using-openid-connect-to-access-cloud-resources">使用 OpenID Connect 访问云资源</a></font></h2><p>如果我们的 GitHub Actions 工作流需要访问支持 OpenID Connect (OIDC) 的云提供商的资源，我们可以配置我们的工作流以直接向云提供商进行身份验证。这将使我们能够停止将这些凭据存储为长期密钥，并提供其他安全优势。有关更多信息，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect">关于使用 OpenID Connect 加强安全性</a>”</p>
<h2 id="4-工作流模板和第三方操作"><a href="#4-工作流模板和第三方操作" class="headerlink" title="4. 工作流模板和第三方操作"></a><font size=3>4. <a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/about-github-actions/about-continuous-deployment-with-github-actions#workflow-templates-and-third-party-actions">工作流模板和第三方操作</a></font></h2><p>GitHub 为多种流行服务（例如 Azure Web App）提供了部署工作流模板。要了解如何开始使用工作流模板，请参阅“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/learn-github-actions/using-starter-workflows">使用工作流模板</a>”或<a target="_blank" rel="noopener" href="https://github.com/actions/starter-workflows/tree/main/deployments">浏览完整的部署工作流模板列表</a>。我们还可以查看GitHub 针对特定部署工作流的更详细指南，例如“<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service">将 Node.js 部署到 Azure 应用服务</a>”。</p>
<p>许多服务提供商还在 GitHub Marketplace 上提供用于部署到其服务的 action。有关完整列表，请参阅<a target="_blank" rel="noopener" href="https://github.com/marketplace?category=deployment&type=actions">GitHub Marketplace</a>。</p>
<h1 id="四、换句话说？"><a href="#四、换句话说？" class="headerlink" title="四、换句话说？"></a><font size=3>四、换句话说？</font></h1><p>哎，上面看完其实还是不是很懂，看了一下阮一峰哪个教程，感觉好理解一点。</p>
<p>持续集成由很多操作组成，比如抓取代码、运行测试、登录远程服务器，发布到第三方服务等等。GitHub 把这些操作就称为 actions。</p>
<p>很多操作在不同项目里面是类似的，完全可以共享。GitHub 注意到了这一点，想出了一个很妙的点子，允许开发者把每个操作写成独立的脚本文件，存放到代码仓库，使得其他开发者可以引用。</p>
<p>如果我们需要某个 action，不必自己写复杂的脚本，直接引用他人写好的 action 即可，整个持续集成过程，就变成了一个 actions 的组合。这就是 GitHub Actions 最特别的地方。</p>
<p>GitHub 做了一个<a target="_blank" rel="noopener" href="https://github.com/marketplace?type=actions">官方市场</a>，可以搜索到他人提交的 actions。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/05GithubActions/LV02-GitHubActions-01-%E4%BA%86%E8%A7%A3GitHubActions/img/image-20241227150710295.png" alt="image-20241227150710295"  />

<p>另外，还有一个 <a target="_blank" rel="noopener" href="https://github.com/sdras/awesome-actions">awesome actions</a> 的仓库，也可以找到不少 action。上面说了，每个 action 就是一个独立脚本，因此可以做成代码仓库，使用<code>userName/repoName</code>的语法引用 action。比如，<code>actions/setup-node</code>就表示<code>github.com/actions/setup-node</code>这个<a target="_blank" rel="noopener" href="https://github.com/actions/setup-node">仓库</a>，它代表一个 action，作用是安装 Node.js。事实上，GitHub 官方的 actions 都放在 <a target="_blank" rel="noopener" href="https://github.com/actions">github.com&#x2F;actions</a> 里面。</p>
<p>既然 actions 是代码仓库，当然就有版本的概念，用户可以引用某个具体版本的 action。下面都是合法的 action 引用，用的就是 Git 的指针概念，详见<a target="_blank" rel="noopener" href="https://help.github.com/en/articles/about-actions#versioning-your-action">官方文档</a>。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">actions/setup-node@74bc508</span> <span class="comment"># 指向一个 commit</span></span><br><span class="line"><span class="string">actions/setup-node@v1.0</span>    <span class="comment"># 指向一个标签</span></span><br><span class="line"><span class="string">actions/setup-node@master</span>  <span class="comment"># 指向一个分支</span></span><br></pre></td></tr></table></figure>



<blockquote>
<p>参考资料：</p>
<p>【1】<a target="_blank" rel="noopener" href="https://www.ruanyifeng.com/blog/2019/09/getting-started-with-github-actions.html">GitHub Actions 入门教程 - 阮一峰的网络日志</a></p>
<p>【2】<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/writing-workflows/workflow-syntax-for-github-actions">GitHub Actions 工作流程语法 - GitHub 文档 - GitHub 文档</a></p>
<p>【3】<a target="_blank" rel="noopener" href="https://www.ruanyifeng.com/blog/2016/07/yaml.html">YAML 语言教程 - 阮一峰的网络日志</a></p>
<p>【4】<a target="_blank" rel="noopener" href="https://yaml.org/spec/1.2.2/">YAML Ain’t Markup Language (YAML™) revision 1.2.2</a></p>
<p>【5】<a target="_blank" rel="noopener" href="https://githubdocs.cn/en/actions/guides">GitHub Actions 指南 - GitHub 文档 - GitHub 文档</a></p>
</blockquote>

    </div>

    
    
    

    <footer class="post-footer">




    <div>
        
            <div style="text-align:center;color: #ccc;font-size:14px;">
            ----------本文结束
            <i class="fas fa-fan fa-spin" style="color: #FF1493; font-size: 1rem"></i>
            感谢您的阅读----------
            </div>
        
    </div>





  
  <div class="my_post_copyright"> 
    <p><span>文章标题:</span><a href="/post/cae87acd.html">LV02-GitHubActions-01-了解GitHubActions</a></p>
    <p><span>文章作者:</span><a href="/" title="欢迎访问 《苏木》 的学习笔记">苏木</a></p>
    <p><span>发布时间:</span>2024年12月28日 - 09:54</p>
    <p><span>最后更新:</span>2025年06月14日 - 00:25</p>
    <p><span>原始链接:</span><a href="/post/cae87acd.html" title="LV02-GitHubActions-01-了解GitHubActions">https://sumumm.github.io/post/cae87acd.html</a></p>
    <p><span>许可协议:</span><i class="fab fa-creative-commons"></i> <a rel="license" href= "https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
  </div>
  


          <div class="post-tags">
              <a href="/tags/GithubActions/" rel="tag"><i class="fa fa-tag"></i> GithubActions</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/6476912c.html" rel="prev" title="LV02-GitHubActions-02-工作流程语法">
                  <i class="fa fa-angle-left"></i> LV02-GitHubActions-02-工作流程语法
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/e27975db.html" rel="next" title="05GitHubActions-readme">
                  05GitHubActions-readme <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 2017 – 
    <span itemprop="copyrightYear">2025</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">苏木</span>
  </div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">3.7m</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">225:26</span>
  </span>
</div>




    <span id="sitetime"></span>
    <script defer language=javascript>
        function siteTime()
        {
            window.setTimeout("siteTime()", 1000);
            var seconds = 1000;
            var minutes = seconds * 60;
            var hours = minutes * 60;
            var days = hours * 24;
            var years = days * 365;
            var today = new Date();
            var todayYear = today.getFullYear();
            var todayMonth = today.getMonth()+1;
            var todayDate = today.getDate();
            var todayHour = today.getHours();
            var todayMinute = today.getMinutes();
            var todaySecond = today.getSeconds();
            /*==================================================
            Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
            year        - 作为date对象的年份，为4位年份值
            month       - 0-11之间的整数，做为date对象的月份
            day         - 1-31之间的整数，做为date对象的天数
            hours       - 0(午夜24点)-23之间的整数，做为date对象的小时数
            minutes     - 0-59之间的整数，做为date对象的分钟数
            seconds     - 0-59之间的整数，做为date对象的秒数
            microseconds - 0-999之间的整数，做为date对象的毫秒数
            ==================================================*/
            var t1 = Date.UTC(2017, 
                              5, 
                              19, 
                              0, 
                              0, 
                              0); //北京时间
            var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
            var diff = t2-t1;
            var diffYears = Math.floor(diff/years);
            var diffDays = Math.floor((diff/days)-diffYears*365);
            var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
            var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
            var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
            document.getElementById("sitetime").innerHTML="已在这里 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
        }
        siteTime();
    </script>



    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/next-theme-pjax/0.6.0/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.umd.js" integrity="sha256-ytMJGN3toR+a84u7g7NuHm91VIR06Q41kMWDr2pq7Zo=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lozad.js/1.16.0/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>




  <script src="/js/third-party/fancybox.js"></script>

  <script src="/js/third-party/pace.js"></script>


  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


 
        <div id="click-show-text"
            data-mobile = false
            data-text = 富强,民主,文明,和谐,自由,平等,公正,法制,爱国,敬业,诚信,友善
            data-fontsize = 15px
            data-random= false>
        </div>
       

      
        <script async src=https://cdn.jsdelivr.net/npm/hexo-next-mouse-effect@latest/click/showText.js></script>
      

      
    




    <script async src="/js/fancybox_param.js"></script>





<!-- APlayer本体 -->



</body>
</html>
